﻿using System.Collections.Generic;
using System.Diagnostics.Contracts;

namespace System.Reactive.Concurrency
{
	public sealed class ScheduledItem<TAbsolute, TValue> : ScheduledItem<TAbsolute>
		where TAbsolute : IComparable<TAbsolute>
	{
		public ScheduledItem(IScheduler scheduler, TValue state, Func<IScheduler, TValue, IDisposable> action, TAbsolute dueTime)
			: this(scheduler, state, action, dueTime, Comparer<TAbsolute>.Default)
		{
			Contract.Requires(scheduler != null, null, "scheduler != null");
			Contract.Requires(action != null, null, "action != null");
		}

		public ScheduledItem(IScheduler scheduler, TValue state, Func<IScheduler, TValue, IDisposable> action, TAbsolute dueTime, IComparer<TAbsolute> comparer)
			: base(dueTime, comparer)
		{
			Contract.Requires(scheduler != null, null, "scheduler != null");
			Contract.Requires(action != null, null, "action != null");
			Contract.Requires(comparer != null, null, "comparer != null");
		}

		protected override IDisposable InvokeCore()
		{
			return null;
		}
	}
}